/**
 * Created with JetBrains PhpStorm.
 * User: dsphinx
 * Date: 12/5/13
 * Time: 10:19 PM
 * To change this template use File | Settings | File Templates.
 */


$(".chzn-select").chosen({allow_single_deselect: true, no_results_text: " δεν βρέθηκε , ξαναπροσπαθήστε"});
$(".chzn-select-deselect").chosen({allow_single_deselect: true, no_results_text: " δεν βρέθηκε , ξαναπροσπαθήστε"});

$("#searching_categories").load("App/Ajax/search_category_side.php",{  category: $('#category_old').val(), query:  $('#query_old').val() }, function () {
    // alert( "Load was performed." );
    $("#categories_extra").chosen({allow_single_deselect: true});

});


$('#category').change(function () {
    var x = $(this).val();
    var t2 = $('#query').html();
    var t=1;

    $("#search_extra").load("App/Ajax/search_category.php", {  category: x, action: t, query: t2 }, function (data) {
        //   alert( "Load was performed." +data );
    });

});




// $('#search input[name="query"]').liveSearch();

